package com.zhentao.controller;

import com.zhentao.pojo.CzCategory;
import com.zhentao.service.CzCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("cz")
public class CzCategoryController {

    @Autowired
    private  CzCategoryService categoryService;



    @RequestMapping("/tree")
    public List<CzCategory> getCategoryTree() {
        return categoryService.getCategoryTree();
    }
}
